package com.devops.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.devops.admin.model.DOSKubernetesResource;
import com.devops.admin.po.DOSKubernetesResourcePo;
import com.devops.admin.po.DOSProjectPo;
import com.devops.admin.vo.DOSKubernetesResourceVo;
import com.devops.admin.vo.DOSNamespaceChart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName DOSKubernetesResourceMapper
 * @Description TODO
 * @Author hepingguo
 * @Date 2022/8/11 14:47
 **/
@Mapper
public interface DOSKubernetesResourceMapper extends BaseMapper<DOSKubernetesResource> {
    /**
     * @Author heyabo
     * @Description 查询k8s资源列表
     * @Date 09:40 2022/8/12
     * @Param [kubernetesResource]
     * @return java.util.List<com.devops.admin.model.DOSKubernetesResource>
     **/
    List<DOSKubernetesResourcePo> getList(@Param("param") DOSKubernetesResourceVo kubernetesResource);
    /**
     * @Author heyabo
     * @Description 分页查询k8s资源列表
     * @Date 10:02 2022/8/14
     * @Param [kubernetesResource, page]
     * @return java.util.List<com.devops.admin.po.DOSKubernetesResourcePo>
     **/
    List<DOSKubernetesResourcePo> getPageaList(@Param("param") DOSKubernetesResourceVo kubernetesResource, Page<DOSKubernetesResourcePo> page);

    /**
     * @Author heyabo
     * @Description 根据k8s资源id查询集群详情
     * @Date 19:05 2022/8/18
     * @Param [kubernetesResourceId]
     * @return com.devops.admin.vo.DOSNamespaceChart
     **/
    DOSNamespaceChart getInfoById(Integer kubernetesResourceId);

    List<String> getNameSimilarity(String name,Double similarityLimit);
}
